package top.aicats.pattern.singleton.hungrySingleton;

public class HungrySingleton {
    private HungrySingleton()
    {

    }
    private final static HungrySingleton hungrySingleton = new HungrySingleton();

    public static HungrySingleton getInstance()
    {
        return hungrySingleton;
    }

    public void testPrint()
    {
        System.out.println("test hungry" + Thread.currentThread().getName());
    }

    private Object readResolve() {
        return hungrySingleton;
    }
}
